<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>props</title>
  </head>
  <div id="app"></div>

  <body>
    <script src="../../public/js/react.development.js"></script>
    <script src="../../public/js/react-dom.development.js"></script>
    <script src="../../public/js/babel.min.js"></script>
    <Script src="../../public/js/prop-types.js"></Script>
    <script type="text/babel">
      class Person extends React.Component {
        static propTypes = {
					name:PropTypes.string.isRequired,
					age:PropTypes.number,
					speak:PropTypes.fun
				}
        render() {
          const { name } = this.props;
          return (
            <ul onClick={speak}>
							<li>名字:{name}</li>
							<li></li>
							<li></li>
            </ul>
          )
        }
      }

      ReactDOM.render(<Person />, document.getElementById("app"));
    </script>
  </body>
</html>
